package team.scau.laboratory_repair.common.enums;

public enum RecordStatus {

    DISCARD("废弃", 0), ORIGIN("未审核", 1), CHECKED("等待接手", 2), DEALING("等待维修", 3), MENDED("等待确认", 4),
    FINISHED("完成", 5);

    private final String ch;
    private final int ordinal;

    RecordStatus(String ch, int ordinal) {
        this.ch = ch;
        this.ordinal = ordinal;
    }

    @Override
    public String toString() {
        return ch;
    }

    public static RecordStatus valueOf(int ordinal) {
        switch (ordinal) {
            case 1:
                return ORIGIN;
            case 2:
                return CHECKED;
            case 3:
                return DEALING;
            case 4:
                return MENDED;
            case 5:
                return FINISHED;
            default:
                return DISCARD;
        }
    }
}
